/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Initializer;
import Board.*;
import parserjson.*;
import com.google.gson.*;
import JplManagement.*;

/**
 *
 * @author Lore
 */
public class InitializeBoard {

    public static String WumpusBoards;
    public static String MapBoards;

    public static ElementosWumpus tableroWumpus;
    public static MapeoWumpus mapaWumpus;

    public static void Initializer() throws NoSuchFieldException, IllegalAccessException{
        //Generar tableros wumpus
        WumpusBoards = Board.MappingGenerator.createWorld();

        System.out.println("100 Tableros Wumpus");
        System.out.println(WumpusBoards);

        //Generar tableros Mapas
        MapBoards = Board.MappingGenerator.createMap();

        System.out.println("100 Mapas");
        System.out.println(MapBoards);

        Gson gson=new Gson();

        //prueba
        //tableroWumpus=gson.fromJson("{\"problems\":[{\"wumpus\":{\"row\":3,\"col\":4},\"gold\":{\"row\":1,\"col\":4},\"pits\":[{\"row\":1,\"col\":3},{\"row\":2,\"col\":2},{\"row\":2,\"col\":3}]}]}", ElementosWumpus.class);

       
        //Parsear tableros wumpus
        tableroWumpus=gson.fromJson(WumpusBoards, ElementosWumpus.class);

        //Parsear tableros mapa
        mapaWumpus = gson.fromJson(MapBoards, MapeoWumpus.class);

       
       
    }

//    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException{
//        Initializer();
//        JplManagement.useJpl uJpl = new JplManagement.useJpl();
//        uJpl.initializeWumpus(tableroWumpus.problems[0], "1", "1");
//
//    }
}

